import { http, httpGet } from '../index';
export const getTest = (data: mockCommon.testParam) => {
  return http({
    url: '/api/common/test',
    method: 'post',
    //参数和拦截器
    data,
    interceptors: {
      // 接口请求拦截器
      requestInterceptors: (config) => {
        console.log('接口请求拦截器');
        return config;
      },
      // 接口响应拦截器
      responseInterceptors: (result) => {
        console.log('接口响应拦截器', result);
        return result;
      },
    },
  });
};
export const getTest2 = (data: any) => {
  return httpGet({
    url: '/api/common/test',
    //参数和拦截器
    params: {
      ...data,
    },
    interceptors: {
      // 接口请求拦截器
      requestInterceptors: (config) => {
        console.log('接口请求拦截器');
        return config;
      },
      // 接口响应拦截器
      responseInterceptors: (result) => {
        console.log('接口响应拦截器', result);
        return result;
      },
    },
  });
};
